let t = require;
let e = module
let o = e.exports;
o.default = e.exports;

'use strict';
console.log("start");
var _n106,
    i =
        (this && this.__extends) ||
        ((_n106 = function n(t, e) {
            return (_n106 =
                Object.setPrototypeOf ||
                ({
                    __proto__: []
                }
                    instanceof Array &&
                    function (t, e) {
                        t.__proto__ = e;
                    }) ||
                function (t, e) {
                    for (var o in e) {
                        Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]);
                    }
                })(t, e);
        }),
            function (t, e) {
                function o() {
                    this.constructor = t;
                }
                _n106(t, e),
                    (t.prototype =
                        null === e ?
                            Object.create(e) :
                            ((o.prototype = e.prototype), new o()));
            });
Object.defineProperty(o, '__esModule', {
    value: !0
}),
    (o.GuideTipsCom = void 0);
var r = t('UIComponent'),
    a = t('StrUtils'),
    s = t('ComUtils'),
    c = (function (t) {
        function e() {
            return (null !== t && t.apply(this, arguments)) || this;
        }
        return (
            i(e, t),
            (e.prototype.onInit = function () {
                t.prototype.onInit.call(this),
                    (this._tmpPt = cc.v2()),
                    (this._txtLabel = s.default.getComponent(
                        cc.Label,
                        this.view,
                        'msg/txtLabel'
                    )),
                    (this._message = s.default.getNode(this.view, 'msg')),
                    (this._icons = s.default.getNode(this.view, 'icons')),
                    (this._arrows = s.default.getNode(this.view, 'msg/arrows')),
                    (this._banyatu = s.default.getNode(this.view, 'msg/banyatu')),
                    this.refresh();
            }),
            (e.prototype.setTips = function (t) {
                let temp = t == "点击关闭" ? "确认键或返回键关闭" : t;
                this._tips != temp && ((this._tips = temp), this.refreshTips());
            }),
            (e.prototype.setType = function (t) {
                this._type != t && ((this._type = t), this.refresh());
            }),
            (e.prototype.setKind = function (t) {
                this._arrows.active = 1 == t;
            }),
            (e.prototype.setIcon = function (t) {
                for (var e = 0; e < this._icons.childrenCount; e++) {
                    this._icons.children[e].active =
                        this._icons.children[e].name == t;
                }
                this._banyatu.active = this._icons.children[0].active;
            }),
            (e.prototype.refreshTips = function () {
                this._txtLabel && this._tips ?
                    ((this._txtLabel.overflow = cc.Label.Overflow.NONE),
                        (this._txtLabel.string = a.default.replaceNewLine(
                            this._tips
                        )),
                        (this.view.active = !0),
                        this.refresh()) :
                    (this.view.active = !1);
            }),
            (e.prototype.refresh = function () {
                switch (
                ((this._txtLabel.overflow = cc.Label.Overflow.RESIZE_HEIGHT),
                    (this._txtLabel.node.width = 560),
                    (this._message.width = this._txtLabel.node.width + 60),
                    (this._message.height = this._txtLabel.node.height + 110),
                    (this.view.width = this._message.width),
                    (this.view.height = this._message.height),
                    (this._tmpPt.x = -this._message.width / 2),
                    (this._tmpPt = this._message.convertToWorldSpaceAR(
                        this._tmpPt
                    )),
                    this._type)
                ) {
                    case 1:
                        (this._message.x = 0),
                            (this._message.y = this._message.height / 2);
                        break;

                    case 2:
                        (this._message.x = 0),
                            (this._message.y =
                                this._message.height / 2 + this._icons.height);
                        break;

                    case 3:
                        (this._message.x = -this._message.width / 2),
                            (this._message.y = 0);
                        break;

                    case 4:
                        (this._message.x = this._message.width / 2),
                            (this._message.y = 0);
                }
                (this._icons.x = this._message.x),
                    (this._icons.y =
                        this._message.y + this._message.height / 2 + 70),
                    (this._arrows.x = this._message.width / 2 - 20),
                    (this._arrows.y = -(this._message.height / 2 - 20));
            }),
            e
        );
    })(r.UIComponent);
(o.GuideTipsCom = c), console.log("end");
module.exports = e.exports;